import React from 'react';
import './index.less';
import OperatorBar from './OperatorBar';
import ProjectInfo from './ProjectInfo';
import ProjectList from './ProjectList';
import {bindModel, render} from 'react-division';
import Model from './Model';

bindModel({
    pageM: Model
});

class ProjectManager extends React.Component {
    constructor(props) {
        super(props);
    }

    render() {
        const {pageM} = this.props;

        return (
            <div className="project-manager-page">
                <OperatorBar />
                {pageM.page === 'edit' && <ProjectInfo />}
                {pageM.page === 'list' && <ProjectList />}
            </div>
        );
    }
}


export default render({
    models: ['pageM']
})(ProjectManager);
